package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TAccountMapper;
import com.ruoyi.system.domain.TAccount;
import com.ruoyi.system.service.ITAccountService;

/**
 * 注册帐户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-17
 */
@Service
public class TAccountServiceImpl implements ITAccountService 
{
    @Autowired
    private TAccountMapper tAccountMapper;

    /**
     * 查询注册帐户
     * 
     * @param id 注册帐户主键
     * @return 注册帐户
     */
    @Override
    public TAccount selectTAccountById(String id)
    {
        return tAccountMapper.selectTAccountById(id);
    }

    /**
     * 查询注册帐户列表
     * 
     * @param tAccount 注册帐户
     * @return 注册帐户
     */
    @Override
    public List<TAccount> selectTAccountList(TAccount tAccount)
    {
        return tAccountMapper.selectTAccountList(tAccount);
    }

    /**
     * 新增注册帐户
     * 
     * @param tAccount 注册帐户
     * @return 结果
     */
    @Override
    public int insertTAccount(TAccount tAccount)
    {
        tAccount.setCreateTime(DateUtils.getNowDate());
        return tAccountMapper.insertTAccount(tAccount);
    }

    /**
     * 修改注册帐户
     * 
     * @param tAccount 注册帐户
     * @return 结果
     */
    @Override
    public int updateTAccount(TAccount tAccount)
    {
        tAccount.setUpdateTime(DateUtils.getNowDate());
        return tAccountMapper.updateTAccount(tAccount);
    }

    /**
     * 批量删除注册帐户
     * 
     * @param ids 需要删除的注册帐户主键
     * @return 结果
     */
    @Override
    public int deleteTAccountByIds(String[] ids)
    {
        return tAccountMapper.deleteTAccountByIds(ids);
    }

    /**
     * 删除注册帐户信息
     * 
     * @param id 注册帐户主键
     * @return 结果
     */
    @Override
    public int deleteTAccountById(String id)
    {
        return tAccountMapper.deleteTAccountById(id);
    }
}
